﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>dynamic element click</title>
</head>
<body>
    With click():<br />
    <ul id="click">
        <li>List item</li>
        <li>List item</li>
        <li>List item</li>
    </ul>

    <br /><br />

    With on():<br />
    <ul id="on">
        <li>List item</li>
        <li>List item</li>
        <li>List item</li>
    </ul>
</body>
</html>
<script src="Scripts/jquery-2.1.4.js"></script>
<script language="javascript">
    $('#click li').click(function () {
        $(this).parent().append($('<li>List item</li>'));
    });


    $('#on').on('click', 'li', function () {
        $(this).parent().append($('<li>List item</li>'));
    });
</script>